{\rtf1\ansi\ansicpg1252\cocoartf2512
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Bold;\f1\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red155\green35\blue147;\red255\green255\blue255;\red0\green0\blue0;
\red11\green79\blue121;\red57\green0\blue160;\red15\green104\blue160;\red28\green70\blue74;\red50\green109\blue116;
\red108\green54\blue169;\red93\green108\blue121;\red28\green0\blue207;\red196\green26\blue22;}
{\*\expandedcolortbl;;\csgenericrgb\c60759\c13753\c57628;\csgenericrgb\c100000\c100000\c100000;\csgenericrgb\c0\c0\c0\c85000;
\csgenericrgb\c4314\c30980\c47451;\csgenericrgb\c22454\c0\c62803;\csgenericrgb\c5882\c40784\c62745;\csgenericrgb\c10981\c27276\c28869;\csgenericrgb\c19418\c42935\c45455;
\csgenericrgb\c42190\c21278\c66379;\csgenericrgb\c36526\c42188\c47515;\csgenericrgb\c11000\c0\c81000;\csgenericrgb\c77000\c10200\c8600;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\deftab593
\pard\tx593\pardeftab593\pardirnatural\partightenfactor0

\f0\b\fs24 \cf2 \cb3 import
\f1\b0 \cf4  UIKit\
\

\f0\b \cf2 class
\f1\b0 \cf4  \cf5 ViewController\cf4 : \cf6 UIViewController\cf4  \{\
    
\f0\b \cf2 private
\f1\b0 \cf4  
\f0\b \cf2 var
\f1\b0 \cf4  \cf7 modelParser\cf4 : \cf8 ModelParser\cf4 ? =\
    \cf8 ModelParser\cf4 (modelFileInfo: \cf8 ModelFile\cf4 .\cf9 modelInfo\cf4 )\
    
\f0\b \cf2 @IBOutlet
\f1\b0 \cf4  
\f0\b \cf2 weak
\f1\b0 \cf4  
\f0\b \cf2 var
\f1\b0 \cf4  \cf7 txtUserData\cf4 : \cf6 UITextField\cf4 !\
    \
    
\f0\b \cf2 @IBOutlet
\f1\b0 \cf4  
\f0\b \cf2 weak
\f1\b0 \cf4  
\f0\b \cf2 var
\f1\b0 \cf4  \cf7 txtResult\cf4 : \cf6 UILabel\cf4 !\
    
\f0\b \cf2 @IBAction
\f1\b0 \cf4  
\f0\b \cf2 func
\f1\b0 \cf4  \cf7 btnGo\cf4 (
\f0\b \cf2 _
\f1\b0 \cf4  sender: 
\f0\b \cf2 Any
\f1\b0 \cf4 ) \{\
        \cf9 doInference\cf4 ()\
    \}\
    
\f0\b \cf2 override
\f1\b0 \cf4  
\f0\b \cf2 func
\f1\b0 \cf4  \cf7 viewDidLoad\cf4 () \{\
        
\f0\b \cf2 super
\f1\b0 \cf4 .\cf10 viewDidLoad\cf4 ()\
        \cf11 // Do any additional setup after loading the view.\cf4 \
    \}\
    
\f0\b \cf2 private
\f1\b0 \cf4  
\f0\b \cf2 func
\f1\b0 \cf4  \cf7 doInference\cf4 () \{\
      \
      
\f0\b \cf2 guard
\f1\b0 \cf4  
\f0\b \cf2 let
\f1\b0 \cf4  text = \cf9 txtUserData\cf4 .\cf10 text\cf4 , text.\cf10 count\cf4  \cf10 >\cf4  \cf12 0\cf4  
\f0\b \cf2 else
\f1\b0 \cf4  \{\
        \cf9 txtResult\cf4 .\cf10 text\cf4  = \cf13 "0.00"\cf4 \
        
\f0\b \cf2 return
\f1\b0 \cf4 \
      \}\
      
\f0\b \cf2 guard
\f1\b0 \cf4  
\f0\b \cf2 let
\f1\b0 \cf4  value = \cf6 Float\cf4 (text) 
\f0\b \cf2 else
\f1\b0 \cf4  \{\
        
\f0\b \cf2 return
\f1\b0 \cf4 \
      \}\
      
\f0\b \cf2 guard
\f1\b0 \cf4  
\f0\b \cf2 let
\f1\b0 \cf4  result = 
\f0\b \cf2 self
\f1\b0 \cf4 .\cf9 modelParser\cf4 ?.\cf9 runModel\cf4 (withInput: value) 
\f0\b \cf2 else
\f1\b0 \cf4  \{\
        
\f0\b \cf2 return
\f1\b0 \cf4 \
      \}\
      \cf9 txtResult\cf4 .\cf10 text\cf4  = \cf6 String\cf4 (format: \cf13 "%.2f"\cf4 , result)\
    \}\
\
\}}